<template>
  <Header title="地址管理"></Header>

  <van-address-list
  v-model="chosenAddressId"
  :list="addressList"
  :disabled-list="disabledList"
  disabled-text="以下地址超出配送范围"
  default-tag-text="默认"
  @add = "add"
  />

</template>

<script setup>
import Header from '@/components/Header.vue';

import { userStore } from '@/store/UserStore';
import { ref } from 'vue';
import { useRouter } from 'vue-router';

const store = userStore();

const addressList = store.addressList;
const disabledList = store.disabledList;
const chosenAddressId = ref('1')

const router = useRouter();

function add(){
  router.push('/addressEdit')
}

</script>
<style>
.van-address-item__name{
  font-size: 10px;
  color: red;
}
.van-address-item__address{
  font-size: 10px;
}
</style>